#include <stdio.h>

int main(int argc,char const *argv[])
{
    FILE* file = fopen("test.txt","a+");
    if (file == NULL)
    {
        printf("打开文件失败！\n");
    }
    else
    {
        printf("打开文件成功！（%p)\n",file);
    }

    // 关闭文件
    int ret = fclose(file);
    if (ret == 0) 
    {
        printf("关闭文件成功！\n");
    }
    else
    {
        printf("关闭文件失败！\n");
    }
    
    return 0;
}

